package com.sanjishu.enterlab.electricity.sale.service;

import com.sanjishu.enterlab.electricity.sale.domain.ContractNum;
import com.sanjishu.enterlab.electricity.sale.mapper.ContractNumMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

@Service
public class ContractNumService {

    @Autowired
    private ContractNumMapper contractNumMapper;

    public void createContractNum(Integer contractInfoId, String num) {
        ContractNum contractNum = new ContractNum();
        contractNum.setContractInfoId(contractInfoId);
        contractNum.setNum(num);
        contractNum.setCreatedAt(new Date());
        contractNumMapper.insert(contractNum);
    }
}
